<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>支付页面</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" href="../../css/jqweui/lib/weui.min.css">
    <link rel="stylesheet" href="../../css/jqweui/css/jquery-weui.css">
    <link rel="stylesheet" href="../../css/jqweui/css/jqweui_extend.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_539359_awoasv4izg5.css">
    <script src="../../script/plugins/jquery.min.js"></script>
    <script type="text/javascript" src="../../script/plugins/in/in-min.js"></script>
    <script type="text/javascript" src="../../css/jqweui/js/in-config.js"></script>
    <script src="../../css/jqweui/js/jquery-weui.js"></script>
    <script src="../../css/jqweui/js/util.js"></script>
</head>
<body class="wrap">
<section class="mc-view-box">
    <div class="mc-header-box">
        <div class="mc-header bg-black">
            <a href="javascript:;" onclick="utils.back();" class="head-icon">
                <i class="iconfont icon-arrow-left"></i>
            </a>
            <div class="main-box head-title">
                收银台
            </div>
            <a href="javascript:;" class="head-icon"></a>
        </div>
    </div>
    <div class="mc-scrollview">
        <div class="weui-form-preview">
            <div class="weui-form-preview__hd">
                <label class="weui-form-preview__label">订单金额</label>
                <em class="weui-form-preview__value">¥3219.90</em>
            </div>
            <div class="weui-form-preview__hd">
                <a href="javascript:;" onclick="discount()" class="weui-form-preview__label">优惠金额 <i class="iconfont icon-caiwutuifei text-color-2"></i></a>
                <em class="weui-form-preview__value">- ¥100.00</em>
            </div>
            <div class="weui-form-preview__hd">
                <label class="weui-form-preview__label">应收金额</label>
                <em class="weui-form-preview__value text-color-6">¥3119.90</em>
            </div>
        </div>
        <div class="weui-cells weui-cells_form">
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">银行卡</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input text-right" type="number" pattern="[0-9]*" placeholder="请输入银行卡收款金额" value="0.00">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">现金</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input text-right" type="number" pattern="[0-9]*" placeholder="请输入现金收款金额" value="0.00">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">微信支付</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input text-right" type="number" pattern="[0-9]*" placeholder="请输入微信支付收款金额" value="0.00">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">支付宝</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input text-right" type="number" pattern="[0-9]*" placeholder="请输入支付宝收款金额" value="0.00">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">合计金额</label></div>
                <div class="weui-cell__bd">
                    <input class="weui-input text-right" type="number" pattern="[0-9]*" value="0.00" readonly>
                </div>
            </div>
        </div>

    </div>
    <div class="mc-footer-box" style="padding:10px;">
        <a href="success.html" class="btn btn-success btn-lg btn-block">确认支付</a>
    </div>
</section>
<script type="text/html" id="discount-tpl">
    <div class="weui-cells weui-cells_form">
        <div class="weui-cell mc-cell">
            <div class="weui-cell__hd"><label class="weui-label">订单金额</label></div>
            <div class="weui-cell__bd cell-static">
                ¥3219.90
            </div>
        </div>
        <div class="weui-cell mc-cell esp-cell">
            <div class="weui-cell__hd"><label class="weui-label">优惠金额</label></div>
            <div class="weui-cell__bd">
                <input class="weui-input esp-input" type="number" name="goods_price" value="100.00">
            </div>
        </div>
        <div class="weui-btn-area">
            <a class="weui-btn weui-btn_primary" href="javascript:;" onclick="layer.closeAll();" id="showTooltips">确定</a>
        </div>
    </div>
</script>
<script>
    function discount() {
        In('layer','template',function () {
            var html=template('discount-tpl',{});
            layer.open({
                type: 1
                ,content:html
                ,anim: 'up'
                ,style: 'position:fixed; top:50%;left:5vw; width:90vw; height:200px;margin-top:-100px; border:none;'
            });
        });
    }
</script>
</body>
</html>